<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图片压缩</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 50px auto;
            padding: 20px;
        }
        
        #fileInput {
            display: block;
            width: 100%;
            padding: 10px;
            margin: 20px 0;
            border: 2px dashed #ccc;
            border-radius: 8px;
            font-size: 16px;
        }
        
        #output {
            margin-top: 20px;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 8px;
            min-height: 100px;
            background-color: #f9f9f9;
        }
        
        #output img {
            max-width: 100%;
            height: auto;
            border-radius: 4px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        .loading {
            color: #666;
            font-style: italic;
        }
        
        .error {
            color: red;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <h1>图片压缩工具</h1>
    <input type="file" id="fileInput" accept="image/*">
    <div id="output">
        <p class="loading">选择图片文件开始压缩...</p>
    </div>
    <script src="./main.js"></script>
</body>
</html>